<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <sx:head />
   	<style type="text/css">
			.buttonC {
				text-align: left
			}
			
			.pagetable {
				font-size: 12px;
			}
			</style>
					<style type="text/css">
			@import "css/rep.css";
			</style>
			<style type="text/css">@import "css/rep.css";</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/rep.js"></script>
	<script type="text/javascript" src="js/repStyle.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
   </head>
 
  <body>
   <s:form action="CarOilAction.action" method="post"  theme="simple">
    <p>燃油列表</p>
    <table class="pagetable">
				<tr>

					<td>
						车牌号
						<s:textfield name="query_carnum" style="width:70px;" />
					</td>
					
					<td>
					    日期>=
						<sx:datetimepicker name="startdate" displayFormat="yyyy-MM-dd" />
					</td>
				
					<td>
						<s:submit value="查询" method="findall" onclick='setfistpage()' />
						<input type=button value="导出" onclick=	'Copy2Excel(myTable);'>
					</td>

				</tr>
			</table>

			<table id="myTable" class="tablesorter">
				<thead>
      <tr>
         <th>ID </th>
         <th>车牌号</th>
         <th>日期</th>
         <th>单价</th>
         <th>数量</th>
        <th>金额</th>
        <th></th>
        </tr>
        </thead>
        <tbody>
       <s:iterator id="list" value="list" >
        <tr >
         <td><s:property  value="id"/> </td>
         <td>  <s:select theme="simple" list="#session.car_list" name="carId" listKey="id" listValue="num" headerValue="carId" />  </td>
          <td><s:date format="yyyy-MM-dd" name="mdate"/> </td>
        <td><s:property  value="price"/> </td>
         <td><s:property  value="amount"/> </td>
         <td><s:property  value="sum"/> </td>
         <td>
          <a href="CarOilAction!findbyid.action?id=<s:property value="id"/>">编辑</a>
         </td>
         <td>
          <!--<a href="CarAction!delete?id=<s:property value="id"/>">删除</a> -->
         </td>
        </tr>
       </s:iterator>
       </tbody>
    </table>
    <!-----------------------分页部分---------------------------------------->
      
      
		<table width="850" border="0" class="pagetable">
			  	<tr>
			    	<td>　				
								
							当前第<s:property value="page"/> 页,共<s:property value="planNum"/>条记录, 共分<s:property value="totalPage"/>页
					
				<input type="hidden" name="maxNum" value="">
			    	<input type="hidden" name="page" id="page" value="<s:property value="page"/>">
			    		
						<s:submit value="首页" onclick='setfistpage()' method="findall"></s:submit>	
						<s:if test="page<=1">
						上一页
						</s:if>
						<s:else>
							<s:submit value="上一页" onclick='setlastpage(%{page})' method="findall"></s:submit>		
							
						</s:else>
								
						<s:if test="page>=totalPage">
						 下一页
						</s:if>
					    <s:else>
						<s:submit value="下一页"  onclick='setnextpage(%{page})' method="findall"></s:submit>	
				
					    </s:else>
						<s:submit value="尾页" onclick='settaltolpage(%{totalPage})' method="findall"></s:submit>	
						
						</td>
					
			</table>
        <!-----------------------分页部分---------------------------- -->
    </s:form>

  </body>
</html>
